package com.gxa.core.recycling.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @author ：looker
 * @date ：Created in 2021/11/29 11:20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "admin")
@Entity   //orm对象关系映射
public class Admin implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    //真实姓名
    @Column(name = "name")
    private String name;

    @JsonIgnore
    @Column(name = "pwd")
    private String pwd;

    @Column(name = "sex")
    private String sex;

    //用户名
    @Column(name="nickName")
    private String nickName;

    //省市
    @Column(name="provinces")
    private String provinces;

    //注册时间
    @Column(name = "registerTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date registerTime;

    //注册时间
    @Column(name = "lastTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Timestamp lastTime;

    //ip地址
    @Column(name = "ipAdress")
    private String ipAdress;
}
